Check for buffer and string overflow more precisely.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 Jun 2011 06:16:12 +0000 (23:16 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 Jun 2011 06:16:12 +0000 (23:16 -0700)
commitcfad2527881fdfd03a2aefb71ab2e94ae3f1990f
tree9c78f582096a4c52bf4667c298b6a1df1a4da71d
parent746bc7192cff81cff7ad79c3e075fe57b214eafc
Check for buffer and string overflow more precisely.

* buffer.h (BUF_BYTES_MAX): New macro.
* lisp.h (STRING_BYTES_MAX): New macro.
* alloc.c (Fmake_string):
* character.c (string_escape_byte8):
* coding.c (coding_alloc_by_realloc):
* doprnt.c (doprnt):
* editfns.c (Fformat):
* eval.c (verror):
Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
since they may not be the same number.
* editfns.c (Finsert_char):
* fileio.c (Finsert_file_contents):
Likewise for BUF_BYTES_MAX.
src/ChangeLog
src/alloc.c
src/buffer.h
src/character.c
src/coding.c
src/doprnt.c
src/editfns.c
src/eval.c
src/fileio.c
src/lisp.h